using System;
using System.Collections.Generic;
using System.Text;
using Fireball.ArchLinux.Pacman;
using System.Runtime.InteropServices;

namespace Tests
{
    class Program
    {
 
        static void Main(string[] args)
        {
        	Console.WriteLine();
        	IntPtr pt = IntPtr.Zero;
        	
        	InterfaceApi.alpm_initialize();
        	
        	pmpkg g = new pmpkg();
        	
        	string pkgPath = string.Join(" ",args); //"/home/sebastian/monodevelop-0.13.1-1-i686.pkg.tar.gz";
        	
        	int loaded = PackagesApi.alpm_pkg_load(pkgPath, out g);
			Console.ForegroundColor = ConsoleColor.Yellow;
			Console.WriteLine("PKG Info for {0}",pkgPath);
			Console.WriteLine("----------------------------------");
			
			Console.WriteLine("Name: {0}",g.name);
			Console.WriteLine("Description: {0}",g.desc);
			Console.WriteLine("BuildDate: {0}", g.builddate);
			Console.WriteLine("BuildType: {0}",g.buildtype);
			Console.WriteLine("Arch: {0}",g.arch);
			Console.WriteLine("InstallDate: {0}",g.installdate);
			Console.WriteLine("md5sum: {0}",g.md5sum);
			Console.WriteLine("sha1sum: {0}",g.sha1sum);
			Console.WriteLine("Packager: {0}",g.packager);
			
        	InterfaceApi.alpm_release();
        }
    }
}
